package serviceUser

import (
	"mxshop/app/mxshop_api/api/internal/data"
	srvUser "mxshop/app/mxshop_api/api/internal/service/user"
	"mxshop/pkg/options"
)

type serviceFactory struct {
	data    data.DataFactory
	jwtOpts *options.JwtOptions
}

func (sf *serviceFactory) User() srvUser.UserSrv {
	return newUser(sf.data, sf.jwtOpts)
}

func NewService(store data.DataFactory, jwtOpts *options.JwtOptions) srvUser.UserFactory {
	return &serviceFactory{data: store, jwtOpts: jwtOpts}
}
